import request from '@/utils/request'

export function fetchTemplateList(data) {
  return request({
    url: '/cloud-system/getTemplateList',
    method: 'post',
    data
  })
}

export function fetchTemplateOne(data) {
  return request({
    url: '/cloud-system/getOneTemplateDetail',
    method: 'post',
    data
  })
}

export function createTemplate(data) {
  return request({
    url: '/cloud-system/createOneTemplate',
    method: 'post',
    data
  })
}

export function updateTemplate(data) {
  return request({
    url: '/cloud-system/updateOneTemplate',
    method: 'post',
    data
  })
}

export function deleteTemplate(data) {
  return request({
    url: '/cloud-system/deleteOneTemplate',
    method: 'post',
    data
  })
}
export function batchDeleteTemplate(data) {
  return request({
    url: '/cloud-system/batchDeleteTemplate',
    method: 'post',
    data
  })
}

export function lockTemplate(data) {
  return request({
    url: '/cloud-system/lockOneTemplate',
    method: 'post',
    data
  })
}

export function unlockTemplate(data) {
  return request({
    url: '/cloud-system/unlockOneTemplate',
    method: 'post',
    data
  })
}

export function batchLockTemplate(data) {
  return request({
    url: '/cloud-system/batchLockTemplate',
    method: 'post',
    data
  })
}

export function batchUnLockTemplate(data) {
  return request({
    url: '/cloud-system/batchUnLockTemplate',
    method: 'post',
    data
  })
}
